﻿
angular.module('SLG')
  .controller("loginController", function ($scope,$state,$rootScope,$http) {
     
      $scope.show = function () {
          $state.go("selectServer");
      }

      $scope.userLogin = function () {
          var userName = $scope.userName;
          var userPwd = $scope.userPwd;

          var url = "../../Api.ashx?sys:sno=User&sys:act=Login";
          var params = {"Account": userName, "Password": userPwd };

          $http.post(url, params).success(function (data) {
              if (data.IsSuccess) {
                  $state.go("selectServer");
              }
              
          })
      }
  })